//管理这个项目的所有接口
import axios from "../request/request";

// 首页请求
export const GetHomeDate = () => axios.get("/index/index");
// 搜索页请求
export const GetSearchPopoupData = () => axios.get("/search/index");
// 实时搜索
export const GetsearchTipList = (params) =>
  axios.get("/search/helper", {
    params,
  });
//产品显示页请求
export const GetsearchProuducts = (params) =>
  axios.get("/goods/list", {
    params,
  });
//清除历史记录
export const ClearHistory = (params) =>
  axios.post("/search/clearhistory", params);
//用户登录请求
export const Userlogin = (params) => axios.post("/auth/loginByWeb", params);
// 商品详情页
export const GetProductionDetail = (params) =>
  axios.get("/goods/detail", {
    params,
  });
// 相关产品
export const GetGoodsrelated = (params) =>
  axios.get("/goods/related", {
    params,
  });

// 获取用户购物车数量
export const GetCartQua = () => axios.get("/cart/index", {});

// 加入购物车
export const GetCartAdd = (params) => axios.post("/cart/add", params);

//购物车数据
export const GetCartListData = () => axios.get("/cart/index");
//点击切换商品状态
export const GetChangeChecked = (params) => axios.post("/cart/checked", params);
// 商品步进器
export const GetStper = (params) => axios.post("/cart/update", params);
// 删除商品
export const DelShop = (params) => axios.post("/cart/delete", params);
